package com.lc.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lc.exception.BusinessException;
import com.lc.mapper.PPAMapper;
import com.lc.pojo.PmsProductAttribute;
import com.lc.result.ResultEnum;
import com.lc.service.PPAService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PPAServiceImpl extends ServiceImpl<PPAMapper,PmsProductAttribute> implements PPAService {

    @Resource
    private PPAMapper ppaMapper;

    @Override
    public List<PmsProductAttribute> getAttribute() {
        List<PmsProductAttribute> list = ppaMapper.getAttribute();
        if(list == null ){
            throw new BusinessException(ResultEnum.COMMON_EXCEPTION);
        }
        return list;
    }

}
